
<html>
		<div id="center-column">
			<div class="top-bar">
			<a href="<?php echo  base_url();?>administrator/admin_add" class="button">新增</a>
				<h1>Contents</h1>
				<div class="breadcrumbs"><?php echo anchor('main/index','首页');?> / <?php echo anchor('administrator/admin','用户管理');?></div>
			</div><br />
<!--		  <div class="select-bar">-->
<!--		    <label>-->
<!--		    <input type="text" name="textfield" />-->
<!--		    </label>-->
<!--		    <label>-->
<!--			<input type="submit" name="Submit" value="Search" />-->
<!--			</label>-->
<!--		  </div>-->
 <body>
			<div class="table">
				
				
				<table class="listing" cellpadding="0" cellspacing="0">
					<tr>
						<th>用户编号</th>
						<th>用户名</th>						
						<th>角色</th>
						<th>真实姓名</th>
						<th>部门</th>
						<th>职务</th>
						<th>职称</th>
						<th>备注</th>
						<th class="last">操作</th>
					</tr>
			    <?php foreach($admin as $k=>$val):?>		
					<tr>
                        <td><?php echo $start;?></td> 
						<td><?php echo $val->username;?></td> 
						<td><?php if ($val->role== 0 ){ echo "管理员";}else{ echo "用户";}?></td> 
						<td><?php echo $val->name;?></td>
						<td><?php echo $val->department;?></td> 
						<td><?php echo $val->post;?></td>
						<td><?php echo $val->title;?></td>
						<td><?php echo $val->remarks;?></td>
						<td><?php echo anchor('administrator/admin_detail/'.$val->admin_id,'查看',array('class'=>'admin_detail'));?>&nbsp;&nbsp;|&nbsp;&nbsp;<?php echo anchor('administrator/admin_edit/'.$val->admin_id,'编辑',array('class'=>'admin_edit'));if($user[0]->admin_id!=$val->admin_id){?>&nbsp;&nbsp;|&nbsp;&nbsp;<?php echo anchor('administrator/admin_del/'.$val->admin_id,'删除',array('class'=>'admin_edit',"onclick"=>"return confirm('您确定要删除吗？')?true:false;")); }?><?php if($val->role==1){?>&nbsp;&nbsp;|&nbsp;&nbsp; <?php echo anchor('administrator/admin_reset/'.$val->admin_id,'重置密码',array('class'=>'admin_edit',"onclick"=>"return confirm('您确定要重置此人密码吗？')?true:false;"));?><?php }?></td>
                    </tr>
				<?php $start++;endforeach;?>						
				</table>
				<?php echo $page;?>
			</div>
		</div>
	</div>
	<div id="footer"></div>
</div>

</body>
</html>
